package conf

import (
	"github.com/spf13/viper"
)

var V *viper.Viper

func InitConfig() {
	V = viper.New()
	//path, _ := os.Getwd()
	//fmt.Println("path:", path)
	V.SetConfigFile("config.yaml")
	V.SetConfigType("yaml")
	// 读取配置文件
	if err := V.ReadInConfig(); err != nil {
		Logger.Error("Error reading config file: %s", err)
	}
}
